<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Jetson Inference: commandLine Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NVLogo_2D.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Jetson Inference
   </div>
   <div id="projectbrief">DNN Vision Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classcommandLine.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classcommandLine-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">commandLine Class Reference<div class="ingroups"><a class="el" href="group__util.html">Utilities Library (jetson-utils)</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Command line parser class.  
 <a href="classcommandLine.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="commandLine_8h_source.html">commandLine.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af365794845587db8e89aea0687b1c6f7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommandLine.html#af365794845587db8e89aea0687b1c6f7">commandLine</a> (const int <a class="el" href="classcommandLine.html#a7e44bdf5e5dcafee061bd3827002117a">argc</a>, char **<a class="el" href="classcommandLine.html#adb4c762405ba4b6bb81d99daa85f98bf">argv</a>)</td></tr>
<tr class="memdesc:af365794845587db8e89aea0687b1c6f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor, takes the command line from <code>main()</code>  <a href="#af365794845587db8e89aea0687b1c6f7">More...</a><br /></td></tr>
<tr class="separator:af365794845587db8e89aea0687b1c6f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbce4973201d2353e6cd963220d3dbe3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommandLine.html#afbce4973201d2353e6cd963220d3dbe3">GetFlag</a> (const char *argName)</td></tr>
<tr class="memdesc:afbce4973201d2353e6cd963220d3dbe3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks to see whether the specified flag was included on the command line.  <a href="#afbce4973201d2353e6cd963220d3dbe3">More...</a><br /></td></tr>
<tr class="separator:afbce4973201d2353e6cd963220d3dbe3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1de397bc3cd20c1d475facd89640fb0"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommandLine.html#af1de397bc3cd20c1d475facd89640fb0">GetFloat</a> (const char *argName, float defaultValue=0.0f)</td></tr>
<tr class="memdesc:af1de397bc3cd20c1d475facd89640fb0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get float argument.  <a href="#af1de397bc3cd20c1d475facd89640fb0">More...</a><br /></td></tr>
<tr class="separator:af1de397bc3cd20c1d475facd89640fb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f90663ccf7e3d63ed5bffd043564e9a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommandLine.html#a7f90663ccf7e3d63ed5bffd043564e9a">GetInt</a> (const char *argName, int defaultValue=0)</td></tr>
<tr class="memdesc:a7f90663ccf7e3d63ed5bffd043564e9a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get integer argument.  <a href="#a7f90663ccf7e3d63ed5bffd043564e9a">More...</a><br /></td></tr>
<tr class="separator:a7f90663ccf7e3d63ed5bffd043564e9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77b9289d32c7b949b38a0c6e45c4091e"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommandLine.html#a77b9289d32c7b949b38a0c6e45c4091e">GetString</a> (const char *argName, const char *defaultValue=NULL)</td></tr>
<tr class="memdesc:a77b9289d32c7b949b38a0c6e45c4091e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get string argument.  <a href="#a77b9289d32c7b949b38a0c6e45c4091e">More...</a><br /></td></tr>
<tr class="separator:a77b9289d32c7b949b38a0c6e45c4091e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a2c75a34d87d7e930f7a49c1b2a2369"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommandLine.html#a3a2c75a34d87d7e930f7a49c1b2a2369">GetPosition</a> (unsigned int position, const char *defaultValue=NULL)</td></tr>
<tr class="memdesc:a3a2c75a34d87d7e930f7a49c1b2a2369"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get positional string argument.  <a href="#a3a2c75a34d87d7e930f7a49c1b2a2369">More...</a><br /></td></tr>
<tr class="separator:a3a2c75a34d87d7e930f7a49c1b2a2369"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75409f56ac1ef63a77eb500c6561b2a1"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommandLine.html#a75409f56ac1ef63a77eb500c6561b2a1">GetPositionArgs</a> ()</td></tr>
<tr class="memdesc:a75409f56ac1ef63a77eb500c6561b2a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of positional arguments in the command line.  <a href="#a75409f56ac1ef63a77eb500c6561b2a1">More...</a><br /></td></tr>
<tr class="separator:a75409f56ac1ef63a77eb500c6561b2a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a7e44bdf5e5dcafee061bd3827002117a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommandLine.html#a7e44bdf5e5dcafee061bd3827002117a">argc</a></td></tr>
<tr class="separator:a7e44bdf5e5dcafee061bd3827002117a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb4c762405ba4b6bb81d99daa85f98bf"><td class="memItemLeft" align="right" valign="top">char **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommandLine.html#adb4c762405ba4b6bb81d99daa85f98bf">argv</a></td></tr>
<tr class="separator:adb4c762405ba4b6bb81d99daa85f98bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Command line parser class. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="af365794845587db8e89aea0687b1c6f7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af365794845587db8e89aea0687b1c6f7">&#9670;&nbsp;</a></span>commandLine()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">commandLine::commandLine </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>argv</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor, takes the command line from <code>main()</code> </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="afbce4973201d2353e6cd963220d3dbe3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afbce4973201d2353e6cd963220d3dbe3">&#9670;&nbsp;</a></span>GetFlag()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool commandLine::GetFlag </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>argName</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Checks to see whether the specified flag was included on the command line. </p>
<p>For example, if argv contained <code>--foo</code>, then <code>GetFlag("foo")</code> would return <code>true</code></p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code>, if the flag with argName was found <code>false</code>, if the flag with argName was not found </dd></dl>

</div>
</div>
<a id="af1de397bc3cd20c1d475facd89640fb0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1de397bc3cd20c1d475facd89640fb0">&#9670;&nbsp;</a></span>GetFloat()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float commandLine::GetFloat </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>argName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>defaultValue</em> = <code>0.0f</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get float argument. </p>
<p>For example if argv contained <code>--foo=3.14159</code>, then <code>GetInt("foo")</code> would return <code>3.14159f</code></p>
<dl class="section return"><dt>Returns</dt><dd><code>defaultValue</code> if the argument couldn't be found. (<code>0.0</code> by default). Otherwise, returns the value of the argument. </dd></dl>

</div>
</div>
<a id="a7f90663ccf7e3d63ed5bffd043564e9a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f90663ccf7e3d63ed5bffd043564e9a">&#9670;&nbsp;</a></span>GetInt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int commandLine::GetInt </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>argName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>defaultValue</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get integer argument. </p>
<p>For example if argv contained <code>--foo=100</code>, then <code>GetInt("foo")</code> would return <code>100</code></p>
<dl class="section return"><dt>Returns</dt><dd><code>defaultValue</code> if the argument couldn't be found (<code>0</code> by default). Otherwise, returns the value of the argument. </dd></dl>

</div>
</div>
<a id="a3a2c75a34d87d7e930f7a49c1b2a2369"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a2c75a34d87d7e930f7a49c1b2a2369">&#9670;&nbsp;</a></span>GetPosition()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* commandLine::GetPosition </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>position</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>defaultValue</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get positional string argument. </p>
<p>Positional arguments aren't named, but rather referenced by their index in the list. For example if the command line contained <code>my-program --foo=bar /path/to/my_file.txt</code>, then <code>GetString(0)</code> would return `"/path/to/my_file.txt"</p>
<dl class="section return"><dt>Returns</dt><dd><code>defaultValue</code> if the argument couldn't be found (<code>NULL</code> by default). Otherwise, returns a pointer to the argument value string from the <code>argv</code> array. </dd></dl>

</div>
</div>
<a id="a75409f56ac1ef63a77eb500c6561b2a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75409f56ac1ef63a77eb500c6561b2a1">&#9670;&nbsp;</a></span>GetPositionArgs()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int commandLine::GetPositionArgs </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the number of positional arguments in the command line. </p>
<p>Positional arguments are those that don't have a name. </p>

</div>
</div>
<a id="a77b9289d32c7b949b38a0c6e45c4091e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77b9289d32c7b949b38a0c6e45c4091e">&#9670;&nbsp;</a></span>GetString()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* commandLine::GetString </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>argName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>defaultValue</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get string argument. </p>
<p>For example if argv contained <code>--foo=bar</code>, then <code>GetString("foo")</code> would return <code>"bar"</code></p>
<dl class="section return"><dt>Returns</dt><dd><code>defaultValue</code> if the argument couldn't be found (<code>NULL</code> by default). Otherwise, returns a pointer to the argument value string from the <code>argv</code> array. </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a7e44bdf5e5dcafee061bd3827002117a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e44bdf5e5dcafee061bd3827002117a">&#9670;&nbsp;</a></span>argc</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int commandLine::argc</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="adb4c762405ba4b6bb81d99daa85f98bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb4c762405ba4b6bb81d99daa85f98bf">&#9670;&nbsp;</a></span>argv</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">char** commandLine::argv</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>jetson-utils/<a class="el" href="commandLine_8h_source.html">commandLine.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classcommandLine.html">commandLine</a></li>
    <li class="footer">Generated on Fri Jun 21 2019 16:23:15 for Jetson Inference by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
